#!usr/bin/env python  
# -*- coding:utf-8 -*-
""" 
@author:robot
@file: reverse_num.py 
@version:
@time: 2024/01/15 
"""
import pdb


class Solution:
    result = ''

    def recursion(self, num):
        self.result += str(int(num % 10))
        if num > 10:
            self.recursion(num / 10)

    def reverse_num(self, num):
        self.recursion(num)
        return self.result


print(Solution().reverse_num(12345))
